<!DOCTYPE html>
<html lang="en">
<% let {list:data,grade}=require(`../data.json`)%>

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="shortcut icon" type="image/x-icon" href="//www.ieduchina.com/statics/pcc/img/favicon.ico">
        <title>CAT4 TEST PRACTICE GRADE <%=grade%></title>
        <link rel="stylesheet" href="./css/weui.css">
    </head>

    <body>
        <%=require(`@cs/preview_en_header/index.ejs`)({name:`CAT4 TEST PRACTICE GRADE ${grade}`})%>
            <section>
                <div class="left">
                    <h3>学员答案<span>（耗时2分钟）</span></h3>
                    <ol>
                        <%data.forEach((item,index)=>{%>
                            <li>
                                <p class="num"><%=index+1%>、</p>
                                <%if(item.option && item.option.length){%>
                                    <div class="bg">
                                        <p><span class="error">A</span></p>
                                    </div>
                                <%}else{%>
                                    <div class="bg">
                                        <p>
                                            <img lazy preview src="<%=require(`@images/g1-1-4.png`)%>" alt="">
                                        </p>
                                    </div>
                                <%}%>
                            </li>
                        <%})%>
                    </ol>
                </div>
                <div class="center">
                    <h3>正确答案</h3>
                    <ul>
                        <%data.forEach((item,index)=>{%>
                            <li>
                                <p class="num"><%=index+1%>、
                                    <%item.timu.forEach((its)=>{%>
                                        <%if(its.type=="text"){%>
                                            <%=its.value%>
                                        <%}%>
                                        <% if(its.type=="image"){%>
                                        <br><img lazy preview src="<%=require(`../images/${its.value}.png`)%>" alt="">
                                        <%}%>
                                    <%})%>
                                    <%item.option.forEach((its,index)=>{%>
                                        <%if(its.type=="text"){%>
                                            <p><%=`${['A','B','C','D','E','F'][index]}. ${its.value}`%></p>
                                        <%}else if(its.type=="image"){%>
                                            <p><%=`${['A','B','C','D','E','F'][index]}. `%><img lazy preview src="<%=require(`../images/${its.value}.png`)%>" alt=""></p>
                                        <%}%>
                                    <%})%>
                                </p>
                                <div class="bg">
                                    <p><span><%=item.value%></span></p>
                                    <%if(item.explanation){%>
                                        <p><%item.explanation.forEach((its,index)=>{%>
                                            <%if(its.type=="text"){%>
                                                <%=its.value%>
                                            <%}else{%>
                                                <img lazy preview src="<%=require(`../images/${its.value}.png`)%>" alt="">
                                            <%}%>
                                        <%})%></p>
                                    <%}%>
                                </div>
                            </li>
                        <%})%>
                    </ul>
                </div>
                <div class="right">
                    <form action="/submit" method="post">
                        <h3>老师评分<span>（满分100）</span></h3>
                        <ol>
                            <%data.forEach((item,index)=>{%>
                                <li>
                                    <input maxlength="2" name="t<%=index+1%>" type="text" value="">分
                                </li>
                            <%})%>
                        </ol>
                        <p>总<input type="text" name="sum">分</p>
                        <textarea name="pj" placeholder="请填写评价"></textarea>
                        <button type="submit">确认</button>
                    </form>
                </div>
            </section>
            <div id="preview">
                <img lazy src="https://www.ieduchina.com/statics/pcc/img/hot2.png" alt="">
                <span class="left"></span>
                <span class="right"></span>
            </div>
            <div role="alert" id="textToast" style="display: none;">
                <div class="weui-toast weui-toast_text">
                    <p class="weui-toast__content">文字提示</p>
                </div>
            </div>
            <script src="./js/jquery-3.6.0.min.js"></script>
    </body>

</html>